<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>{$siteTitle}</title>
<link href="__ADMIN__/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__ADMIN__/js/jquery-1.9.1.min.js"></script>
<link rel="stylesheet" href="__ADMIN__/wx/css/default.css">
<script type="text/javascript" src="__ADMIN__/wx/js/ecmall.js" charset="utf-8"></script>
<script type="text/javascript" src="__ADMIN__/wx/js/admin.js" charset="utf-8"></script>
<style type="text/css">
.demo{width:620px; margin:30px auto}
.demo p{line-height:32px}
.btnfile{position: relative;overflow: hidden;margin-right: 4px;display:inline-block;*display:inline;padding:4px 10px 4px;font-size:14px;line-height:18px;*line-height:20px;color:#fff;text-align:center;vertical-align:middle;cursor:pointer;background-color:#5bb75b;border:1px solid #cccccc;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
.btnfile input {position: absolute;top: 0; right: 0;margin: 0;border: solid transparent;opacity: 0;filter:alpha(opacity=0); cursor: pointer;}
.progress { position:relative; margin-left:100px; margin-top:-24px; width:200px;padding: 1px; border-radius:3px; display:none}
.bar {background-color: green; display:block; width:0%; height:20px; border-radius: 3px; }
.percent { position:absolute; height:20px; display:inline-block; top:3px; left:2%; color:#fff }
.files{height:22px; line-height:22px; margin:10px 0}
.delimg{margin-left:20px; color:#090; cursor:pointer}
.place{height:40px; background:url(__ADMIN__/images/righttop.gif) repeat-x;}
.place span{line-height:40px; font-weight:bold;float:left; margin-left:12px;}
.placeul li{float:left; line-height:40px; padding-left:7px; padding-right:12px; background:url(__ADMIN__/images/rlist.gif) no-repeat right;}
.placeul li:last-child{background:none;}
</style>
<script type="text/javascript">
	$(document).ready(function() {
		$(".click").click(function() {
			$(".tip").fadeIn(200);
		});

		$(".tiptop a").click(function() {
			$(".tip").fadeOut(200);
		});

		$(".sure").click(function() {
			$(".tip").fadeOut(100);
		});

		$(".cancel").click(function() {
			$(".tip").fadeOut(100);
		});
	});

	function addService() {
		window.location.href = '{:U("/Admin/Index/addHomeCarousel")}';
	}
</script>
</head>
<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a href="#">首页</a></li>
			<li><a href="#">首页轮播</a></li>
		</ul>
	</div>
	<div class="rightinfo">

		<div class="tools">
			<ul class="toolbar">
				<a href="javascript:void(0);" onclick="addService();"><li
					class="click"><span><img src="__ADMIN__/images/t01.png" /></span>添加轮播图</li></a>
			</ul>
		</div>
		<form action="{:U('updateSort')}" method="post">
		<table class="tablelist">
			<thead>
				<tr>
					<th><input name="" type="checkbox" class="checkall" /></th>
					<th>编号</th>
					<th>轮播图片</th>
					<th>排序</th>
					<th>添加时间</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<foreach name="carousels" item="item">
				<tr>
					<input type="hidden" name="id[]" value="{$item.id}" />
					<td><input name="" type="checkbox" class="checkitem" value="{$item.id}" /></td>
					<td>{$item.id}</td>
					<td><img style="width:320px;height:110px;" src="__UPLOADS__/Home/Carousel/{$item.img_name}" /></td>
					<td ><input type="text" name="sort[]" value="{$item.sort}" class="dfinput" style="width: 50px;"/></td>
					<td >{$item.created|date="Y-m-d H:i:s",###}</td>
					<td ><if condition="$item['status'] eq 1">启用<else/>停用</if></td>
					<td >
						<if condition="$item['status'] eq 1">
						<a href="{:U('/Admin/Index/ban/id/'.$item['id'])}">停用</a>
						<else/>
						<a href="{:U('/Admin/Index/cancelBan/id/'.$item['id'])}">启用</a>
						</if>
						<a class="del" href="{:U('/Admin/Index/deleteCarousel/id/'.$item['id'])}">删除</a>
					</td>
				</tr>
				</foreach>
				<tr>
		            <td colspan="7" class="ptb20">
		                <input type="submit" class="scbtn" value="提交">
		            </td>
		        </tr>
			</tbody>
		</table>
		</form>
		<div class="pagin">
			{$page}
		</div>
	</div>
	<script type="text/javascript">
		$('.tablelist tbody tr:odd').addClass('odd');
	</script>
</body>
</html>